<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type="text/javascript" src="/commons/js/jquery-2.1.1.js"></script>
<script type="text/javascript">
function deleteChild(id){
	var sure = window.confirm("sure to delete this child ?");
	if(sure){
		window.location='/kindergarten/child/deleteChild.action?id='+id;
	}
}
</script>
</head>
<body>
<table>
	<c:forEach var="child" varStatus="idx" items="${childList}">
	<tr bgcolor='${idx.count%2==0?"#EEE8AA":"#66CDAA"}'>
		<td></td><input type="hidden" name="id" value="${child.id}" /></td><td>${idx.count%2==0?'1':'2'}</td><td>${child.name}</td><td><a href="javascript:void(0)" onclick="deleteChild('${child.id}')">delete</a></td><td><a href="/kindergarten/child/updateChildUI.action?id=${child.id}">update</a></td>
	</tr>
	</c:forEach>
</table>	
	<a href="/kindergarten/child/addUI.action">add child</a><br/>
	<a href="/kindergarten/teacher/listTeacher.action">list teachers</a>
	<a href="/kindergarten/chengji/listChengji.action">performance record</a>
</body> 